import { IsNotEmpty, IsString, IsEnum, IsNumber, IsOptional } from 'class-validator';

export class CreatePointsRecordDto {
  @IsNotEmpty()
  @IsNumber()
  userId: number;

  @IsNotEmpty()
  @IsEnum(['收入', '支出'], { message: '类型只能是 收入 或 支出' })
  type: string;

  @IsNotEmpty()
  @IsNumber()
  amount: number;

  @IsNotEmpty()
  @IsString()
  description: string;

  @IsOptional()
  @IsNumber()
  orderId?: number;
} 